﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks;

namespace ShaoLuCommonLibrary
{
    /// <summary>
    /// 加密帮助类
    /// </summary>
    public class EncryptionHelper
    {


        public static string MD5(string source) 
        {
            byte[] result = Encoding.Default.GetBytes(GlobalVariables.Instance.salt+source); 
            MD5 md5 = new MD5CryptoServiceProvider();
            byte[] output = md5.ComputeHash(result);
            string en_result = BitConverter.ToString(output).Replace("-", ""); 
            return en_result;
        }



    }
}
